Let GPS_User take varargs.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 29 Jan 2006 21:39:38 +0000 (21:39 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 29 Jan 2006 21:39:38 +0000 (21:39 +0000)
gpsbabel/jeeps/gpsutil.c
gpsbabel/jeeps/gpsutil.h

index b5cf4b7a62455aa9159c6f2b598ecfaaa51a5f02..4078e2e5e8c1fadf6e51b9310b5080f31b031d0e 100644 (file)
@@ -591,15 +591,17 @@ void GPS_Disable_Warning(void)
 ** @@
 ****************************************************************************/
 
-void GPS_User(char *s)
+void GPS_User(const char *fmt, ...)
 {
-    if(!gps_user)
-       return;
+    va_list  argp;
+    va_start (argp, fmt);
 
-    fprintf(stdout,"%s\n",s);
-    fflush(stdout);
+    if (gps_user) {
+       vfprintf(stdout, fmt, argp);
+       fflush(stdout);
+    }
     
-    return;
+    va_end(argp);
 }
 
 /* @func GPS_Disable_User ***********************************************
index adb75b961ab8756c3221f01b64b67a092fa0ae3d..e22a8ba60342ac4a795643d1602e3b2b9d67adbc 100644 (file)
@@ -31,7 +31,7 @@ void   GPS_Enable_Error(void);
 void   GPS_Enable_Warning(void);
 void   GPS_Disable_Error(void);
 void   GPS_Disable_Warning(void);
-void   GPS_User(char *s);
+void   GPS_User(const char *fmt, ...);
 void   GPS_Disable_User(void);
 void   GPS_Enable_User(void);
 void   GPS_Diagnose(int32 c);